import React, { Component } from 'react';
import {ListContainer} from './comListStyle'
class comList extends Component {
    render() {
        return (
            <div
            style={
                {
                    paddingTop:'0.1rem',
                    width:'100%'
                }
            }
            >
                <ListContainer>
                    <div className="headCon">
                        <span>
                            <img src={this.props.item.sonPosts[0].authorAvatar} alt=""/>
                        </span>
                    </div>
                    <div className="comBody">
                    <h3> <span>{this.props.item.sonPosts[0].authorName} 
                    <b><img style={
                        {
                            width:'0.5rem',
                            marginLeft:'0.1rem'
                        }
                    }
                    src={this.props.item.sonPosts[0].authorGroupIcon} alt=""/></b></span>  </h3>
                        <p dangerouslySetInnerHTML={{__html:this.props.item.sonPosts[0].message}} />
                        <div className="bottom">
                           <div className="time">
                           <span className="time"> 
                                {this.props.item.sonPosts[0].formatTime}
                            </span>
                            
                            <span className="iphone">
                              来自 {this.props.item.sonPosts[0].tail}
                            </span>
                           </div>
                           <div className='icon'>
                               <i className="yo-ico">
                                    &#xe666;
                               </i>
                               <b>
                                    {this.props.item.sonPosts[0].supportCount}
                                </b>
                               <i className="yo-ico">
                                    &#xe90d;
                               </i>
                               <b>
                                {this.props.item.sonPosts[0].opposeCount}
                                </b>
                           </div>
                        </div>
                    </div>
                </ListContainer>
            </div>
        );
    }
}

export default comList;